#pragma once
#include "SqStack.h"
#include "LinkQueue.h"
void test_stack()
{
	Stack ps;
	StackInit(&ps);
	StackPush(&ps, 1);
	StackPush(&ps, 2);
	StackPush(&ps, 3);
	StackPush(&ps, 4);
	StackPush(&ps, 5);
	StackPush(&ps, 6);


	while (!StackEmpty(&ps))
	{
		printf("%d\n", StackTop(&ps));
		StackPop(&ps);
	}
	//printf("%d\n", StackSize(&ps));
	StackDestroy(&ps);
	//StackPush(&ps, 10);
}

void test_queue()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePop(&q);
	//QueuePop(&q);
	//QueuePop(&q);
	//QueuePop(&q);

	/*QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);*/

	printf("%d\n", QueueSize(&q));
	//printf("%d\n", QueueEmpty(&q));
	
	printf("%d\n", QueueFront(&q));
	//printf("%d\n", QueueBack(&q));

	QueueDestroy(&q);

}
int main()
{
	test_queue();
	
	system("pause");
	return 0;
}